package com.server.common.logistics.jc.create;

import com.google.gson.annotations.SerializedName;
import com.server.common.logistics.response.LogisticsResponse;
import lombok.Getter;
import lombok.Setter;
import org.springframework.util.ObjectUtils;

@Getter
@Setter
public class JCCreateOrderResponse extends LogisticsResponse {

    /**
     * ack : false
     * attr1 :
     * attr2 :
     * childList : []
     * delay_type :
     * is_changenumbers :
     * is_delay :
     * is_remote :
     * is_residential :
     * message : %E5%B7%B2%E5%85%A5%E5%BA%93%2F%E5%B7%B2%E5%87%BA%E5%BA%93%E7%9A%84%E8%AE%A2%E5%8D%95%E7%A6%81%E6%AD%A2%E4%BF%AE%E6%94%B9%21
     * order_id :
     * order_privatecode :
     * order_transfercode :
     * post_customername :
     * product_tracknoapitype :
     * reference_number : ESHI0919153702821
     * return_address :
     * tracking_number :
     */
    @SerializedName("ack")
    private String ack;
    @SerializedName("attr1")
    private String attr1;
    @SerializedName("attr2")
    private String attr2;
    @SerializedName("delay_type")
    private String delayType;
    @SerializedName("is_changenumbers")
    private String isChangenumbers;
    @SerializedName("is_delay")
    private String isDelay;
    @SerializedName("is_remote")
    private String isRemote;
    @SerializedName("is_residential")
    private String isResidential;
    @SerializedName("message")
    private String message;
    @SerializedName("order_id")
    private String orderId;
    @SerializedName("order_privatecode")
    private String orderPrivatecode;
    @SerializedName("order_transfercode")
    private String orderTransfercode;
    @SerializedName("post_customername")
    private String postCustomername;
    @SerializedName("product_tracknoapitype")
    private String productTracknoapitype;
    @SerializedName("reference_number")
    private String referenceNumber;
    @SerializedName("return_address")
    private String returnAddress;
    @SerializedName("tracking_number")
    private String trackingNumber;

    @Override
    public Boolean responseOk() {
        return "true".equals(ack);
    }

    @Override
    public Boolean dataEmpty() {
        return ObjectUtils.isEmpty(trackingNumber);
    }
}
